package cn.exrick.xboot.base.vo

import cn.exrick.xboot.core.common.constant.CommonConstant
import cn.exrick.xboot.core.common.utils.NameUtil
import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.springframework.format.annotation.DateTimeFormat
import java.util.*
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size

@ApiModel("监管部门列表返回实体")
data class SecurityAdvisorVo(

        @ApiModelProperty("id")
        var id: String? = null,

        @ApiModelProperty(value = "用户名/昵称/姓名")
        var nickname: @NotNull(message = "不能为空") @Size(max = 20, message = "昵称长度不能超过20") String? = null,

        @ApiModelProperty(value = "用户头像")
        var avatar: String? = CommonConstant.USER_DEFAULT_AVATAR,

        @ApiModelProperty(value = "性别")
        var sex: String? = null,

        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "生日")
        var birth: Date? = null,

        @ApiModelProperty("自拍照")
        var selfPic: String? = null,

        @ApiModelProperty("安全顾问专业信息(多传用逗号隔开)")
        var businessIds: MutableList<String>? = null,

        @ApiModelProperty("安全顾问专业信息")
        var businessIdNameList: String? = null,

        @ApiModelProperty("所属机构名称")
        var organizationName: String? = null,

        @ApiModelProperty("身份证号")
        var idCardNum: String? = null,

        @ApiModelProperty("简介")
        var introduction: String? = null,

        @ApiModelProperty(value = "手机")
        var mobile: @Pattern(regexp = NameUtil.regMobile, message = "11位手机号格式不正确") String? = null,

        @ApiModelProperty(value = "邮箱")
        var email: @Pattern(regexp = NameUtil.regEmail, message = "邮箱格式不正确") String? = null,

        @ApiModelProperty(value = "密码")
        var password: @NotNull(message = "不能为空") String? = null,

        @ApiModelProperty(value = "区域id")
        var areaId: String? = null,

        @ApiModelProperty(value = "区域地址")
        var areaName: String? = null,

        @ApiModelProperty(value = "街道地址")
        var street: String? = null,

        @ApiModelProperty(value = "用户类型 0普通用户 1管理员")
        var type: Int? = CommonConstant.USER_TYPE_NORMAL,

        @ApiModelProperty(value = "状态 默认0正常 -1拉黑")
        var status: Int? = CommonConstant.USER_STATUS_NORMAL,

        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @ApiModelProperty(value = "创建时间", hidden = true)
        var createTime: Date? = null
)